package com.htzz.collection.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 分页查询设备、采集点、时间范围、值相关的工具类
 * @author xudezhi
 * @title: QueryParam8Dto
 * @projectName collection
 * @description: TODO
 * @date 2021/8/3013:11
 */
@Data
@ApiModel(value = "分页查询设备、采集点、时间范围、值相关的工具类",description = "分页查询设备、采集点、时间范围、值相关的工具类")
public class QueryParam8Dto {


    @NotEmpty
    @ApiModelProperty(value = "设备ID",example = "sn19990111")
    private String devId;

    @NotEmpty
    @ApiModelProperty(value = "采集点ID",example = "speed",required = true)
    private String k;

//    @NotEmpty
//    @ApiModelProperty(value = "日期[yyyy-MM-dd]")
//    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
//    private Date date;

    @NotNull
    @ApiModelProperty(value = "比较值",example = "100",required = true)
    private Object value;

    @NotNull
    @ApiModelProperty(value = "开始时间",example = "2021-09-01 12:22:22")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @NotNull
    @ApiModelProperty(value = "结束时间",example = "2021-09-02 12:22:22")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String endTime;

    @Min(1L)
    @ApiModelProperty(value = "当前页",example = "1")
    private int currentPage=1; //默认值 10

    @Min(1L)
    @Max(5000)
    @ApiModelProperty(value = "每页条数",example = "10")
    private int pagesize=10; //默认值 10
}
